//
//  RootBarController.m
//  省市区
//
//  Created by dllo on 16/7/26.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "RootBarController.h"
#import "ViewController.h"
#import "SecondViewController.h"

@interface RootBarController ()

@end

@implementation RootBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.viewControllers = [self getViewControllers];
    
}

- (NSArray *)getViewControllers
{
    NSMutableArray *viewControllers = [NSMutableArray array];
    ViewController *vcOne = [[ViewController alloc]init];
    UINavigationController *naviOne = [[UINavigationController alloc]initWithRootViewController:vcOne];
    [viewControllers addObject:naviOne];
    naviOne.tabBarItem = [[UITabBarItem alloc]initWithTabBarSystemItem:UITabBarSystemItemFeatured tag:100];
    
    SecondViewController *vcOfTwo = [[SecondViewController alloc]init];
    UINavigationController *naviTwo = [[UINavigationController alloc]initWithRootViewController:vcOfTwo];
    [viewControllers addObject:naviTwo];
    naviTwo.tabBarItem = [[UITabBarItem alloc]initWithTabBarSystemItem:UITabBarSystemItemHistory tag:200];
    
    
    return viewControllers;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}

@end
